<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/manage/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title>
    <link href="<%= basePath%>lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="<%= basePath%>addPageInit.css" rel="stylesheet" type="text/css" /> 
    <link rel="stylesheet" href="<%= basePath%>lib/kediter/themes/default/default.css" />
    <link href="<%= basePath%>lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" /> 
    <script src="<%= basePath%>lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="<%=basePath%>lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script> 
    <script src="<%= basePath%>lib/jquery-validation/jquery.validate.min.js" type="text/javascript"></script> 
    <script src="<%= basePath%>lib/jquery-validation/jquery.metadata.js" type="text/javascript"></script>
    <script src="<%= basePath%>lib/jquery-validation/messages_cn.js" type="text/javascript"></script>
	<script charset="utf-8" src="<%= basePath%>lib/kediter/kindeditor-min.js"></script>
	<script charset="utf-8" src="<%= basePath%>lib/kediter/lang/zh_CN.js"></script>
	<script src="<%= basePath%>addPageInit.js?99999" type="text/javascript"></script>
	<script src="<%= basePath%>admGlobal.js?9989" type="text/javascript"></script>
	<script type="text/javascript">
function getImgs(){
	var content= window.frames[0].document.body.innerHTML;
	var urls = [];
	content.replace(/\<img.*?src\=\"(.*?)\"[^>]*>/ig, function(a,b) {
    	urls.push(b);
	});
	$("#imgUrl").val(urls.join(',').replace("/ZQShop",""));
}


</script>
</head>

<body style="padding:10px; margin-bottom: 10px;">

    <form name="form1" method="post" action="manageAddProduct" id="form1">
<div>
</div>
        <table cellpadding="0" cellspacing="0" class="l-table-edit" >
        	 <tr>
        	 	<td align="left" class="l-table-edit-td">id:</td>
                <td align="left" class="l-table-edit-td">
                		${model.id}
                </td>
               
            </tr>
             <tr>
                <td align="left" class="l-table-edit-td">标题:</td>
                <td align="left" class="l-table-edit-td">
                 <input name="name" type="text" value="${model.name}" />
                </td>
            </tr>
            <tr>
                <td align="left" class="l-table-edit-td">简介:</td>
                <td align="left" class="l-table-edit-td">
                <textarea name="message" rows="10" cols="10" style="width:100%;text-align:left; height:80px;">${model.message}</textarea>
                </td>
            </tr>
           
             <tr>
                <td align="left" class="l-table-edit-td">图片:</td>
                <td align="left" class="l-table-edit-td">
                  <textarea name="imgUrl" id="imgUrl" rows="10" cols="10" style="width:100%;text-align:left; height:80px;">${model.imgUrl}</textarea>
				  <a href="javascript:void(0);"  onclick="getImgs();">自动获取地址</a>
                </td>
                
            </tr>
            <tr>
                <td align="left" class="l-table-edit-td">商品属性:</td>
                <td align="left" class="l-table-edit-td">
                	<input name="attr" id="attr" value="${model.attr}" type="text" 
                	onclick="loadPick(event,360,240,'false','attr','STATICDATA','','${model.attr}','&p_code=&p_type=ATTR&p_p_type=');"/>
                	<!-- event,mywidth,myheight,radio,tag,code,type,def,params -->
                </td>
            </tr>
            <tr>
                <td align="left" class="l-table-edit-td">一级分类:</td>
                <td align="left" class="l-table-edit-td">
                	<input name="ptype" id="ptype" value="${fcode}" type="text" 
                	onclick="loadPick(event,360,240,'true','ptype','STATICDATA','','${fcode}','&p_code=NAV&p_type=NAV');"/>
                	<!-- event,mywidth,myheight,radio,tag,code,type,def,params -->
                </td>
            </tr>
            <tr>
                <td align="left" class="l-table-edit-td">二级分类:</td>
                <td align="left" class="l-table-edit-td">
                	<input name="type" id="type" value="${model.type}" type="text" 
                	onclick="loadSubType('${model.type}');"/>
                	<!-- event,mywidth,myheight,radio,tag,code,type,def,params -->
                </td>
            </tr>
             <tr>
                <td align="left" class="l-table-edit-td">品牌:</td>
                <td align="left" class="l-table-edit-td">
                <input name="brand" id="brand" value="${model.brand}" type="text"
                onclick="loadPick(event,360,240,'true','brand','STATICDATA','','${model.brand}','&p_code=BRAND&p_type=PP');"/></td>
            </tr>
            <tr>
                <td align="left" class="l-table-edit-td">剩余量:</td>
                <td align="left" class="l-table-edit-td"><input name="remainder" value="${model.remainder}" type="text"/></td>
            </tr>
             <tr>
                <td align="left" class="l-table-edit-td">价格:</td>
                <td align="left" class="l-table-edit-td"><input name="price" value="${model.price}" type="text"/></td>
            </tr>
             <tr>
                <td align="left" class="l-table-edit-td">收藏量:</td>
                <td align="left" class="l-table-edit-td"><input name="favorite" value="${model.favorite}" type="text"/></td>
            </tr>
            
            <tr>
                <td align="left" class="l-table-edit-td">批发价格:</td>
                <td align="left" class="l-table-edit-td"><input name="pifaPrice" value="${model.pifaPrice}" type="text"/></td>
            </tr>
            <tr>
                <td align="left" class="l-table-edit-td">市场价格:</td>
                <td align="left" class="l-table-edit-td"><input name="marketPrice" value="${model.marketPrice}" type="text"/></td>
            </tr>
            
            
             <tr>
                <td align="left" class="l-table-edit-td">返还积分:</td>
                <td align="left" class="l-table-edit-td"><input name="scores" value="${model.scores}" type="text"/></td>
            </tr>
            <s:if test="model.id!=null">
            	<tr>
                <td align="left" class="l-table-edit-td">销售量:</td>
                <td align="left" class="l-table-edit-td"><input name="sellNum" value="${model.sellNum}" type="text"/></td>
          	  </tr>
            	<tr>
                <td align="left" class="l-table-edit-td">评论量:</td>
                <td align="left" class="l-table-edit-td"><input name="commentNum" value="${model.commentNum}" type="text"/></td>
            	</tr>
            	<tr>
                <td align="left" class="l-table-edit-td" valign="top">标识:</td>
                <td align="left" class="l-table-edit-td">
                 <s:select name="flag" list="@cn.wegoteam.shop.enu.FlagType3@values()" listKey="name"
								listValue="name()" value="model.flag"/>
				</td>
                <td align="left"></td>
            </tr> 
            </s:if>
              
            
            <tr>
            <td colspan="2"><textarea id="elm1" name="content" rows="15" cols="20" style="width: 100%; height:200px;">${model.content}</textarea>
            </td></tr>
        </table>
 <br />
 <input name="id" type="hidden" value="${model.id}" />
 
<div style="width:150px; margin:0px auto;">
<input type="submit" value="提交" id="Button1" class="l-button l-button-submit"  /> 
</div>
 </form>

    
</body>
</html>